<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="iso-8859-1">
<title>SocketClient (Commons Net 3.3 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="SocketClient (Commons Net 3.3 API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/SocketClient.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/commons/net/ProtocolCommandSupport.html" title="class in org.apache.commons.net"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/commons/net/SocketClient.html" target="_top">Frames</a></li>
<li><a href="SocketClient.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.net</div>
<h2 title="Class SocketClient" class="title">Class SocketClient</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.net.SocketClient</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../org/apache/commons/net/chargen/CharGenTCPClient.html" title="class in org.apache.commons.net.chargen">CharGenTCPClient</a>, <a href="../../../../org/apache/commons/net/daytime/DaytimeTCPClient.html" title="class in org.apache.commons.net.daytime">DaytimeTCPClient</a>, <a href="../../../../org/apache/commons/net/discard/DiscardTCPClient.html" title="class in org.apache.commons.net.discard">DiscardTCPClient</a>, <a href="../../../../org/apache/commons/net/finger/FingerClient.html" title="class in org.apache.commons.net.finger">FingerClient</a>, <a href="../../../../org/apache/commons/net/ftp/FTP.html" title="class in org.apache.commons.net.ftp">FTP</a>, <a href="../../../../org/apache/commons/net/imap/IMAP.html" title="class in org.apache.commons.net.imap">IMAP</a>, <a href="../../../../org/apache/commons/net/nntp/NNTP.html" title="class in org.apache.commons.net.nntp">NNTP</a>, <a href="../../../../org/apache/commons/net/pop3/POP3.html" title="class in org.apache.commons.net.pop3">POP3</a>, <a href="../../../../org/apache/commons/net/bsd/RExecClient.html" title="class in org.apache.commons.net.bsd">RExecClient</a>, <a href="../../../../org/apache/commons/net/smtp/SMTP.html" title="class in org.apache.commons.net.smtp">SMTP</a>, <a href="../../../../org/apache/commons/net/telnet/TelnetClient.html" title="class in org.apache.commons.net.telnet">TelnetClient</a>, <a href="../../../../org/apache/commons/net/time/TimeTCPClient.html" title="class in org.apache.commons.net.time">TimeTCPClient</a></dd>
</dl>
<hr>
<br>
<pre>public abstract class <a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.55">SocketClient</a>
extends <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">The SocketClient provides the basic operations that are required of
 client objects accessing sockets.  It is meant to be
 subclassed to avoid having to rewrite the same code over and over again
 to open a socket, close a socket, set timeouts, etc.  Of special note
 is the <a href="../../../../org/apache/commons/net/SocketClient.html#setSocketFactory(javax.net.SocketFactory)"><code>setSocketFactory </code></a>
 method, which allows you to control the type of Socket the SocketClient
 creates for initiating network connections.  This is especially useful
 for adding SSL or proxy support as well as better support for applets.  For
 example, you could create a
 <a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/net/SocketFactory.html?is-external=true" title="class or interface in javax.net"><code>SocketFactory</code></a> that
 requests browser security capabilities before creating a socket.
 All classes derived from SocketClient should use the
 <a href="../../../../org/apache/commons/net/SocketClient.html#_socketFactory_"><code>_socketFactory_ </code></a> member variable to
 create Socket and ServerSocket instances rather than instantiating
 them by directly invoking a constructor.  By honoring this contract
 you guarantee that a user will always be able to provide his own
 Socket implementations by substituting his own SocketFactory.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/net/SocketFactory.html?is-external=true" title="class or interface in javax.net"><code>SocketFactory</code></a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#_defaultPort_">_defaultPort_</a></strong></code>
<div class="block">The default port the client should connect to.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#_input_">_input_</a></strong></code>
<div class="block">The socket's InputStream.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#_output_">_output_</a></strong></code>
<div class="block">The socket's OutputStream.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/net/ServerSocketFactory.html?is-external=true" title="class or interface in javax.net">ServerSocketFactory</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#_serverSocketFactory_">_serverSocketFactory_</a></strong></code>
<div class="block">The socket's ServerSocket Factory.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html?is-external=true" title="class or interface in java.net">Socket</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#_socket_">_socket_</a></strong></code>
<div class="block">The socket used for the connection.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/net/SocketFactory.html?is-external=true" title="class or interface in javax.net">SocketFactory</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#_socketFactory_">_socketFactory_</a></strong></code>
<div class="block">The socket's SocketFactory.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#_timeout_">_timeout_</a></strong></code>
<div class="block">The timeout to use after opening a socket.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#connectTimeout">connectTimeout</a></strong></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#NETASCII_EOL">NETASCII_EOL</a></strong></code>
<div class="block">The end of line character sequence used by most IETF protocols.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#SocketClient()">SocketClient</a></strong>()</code>
<div class="block">Default constructor for SocketClient.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#_connectAction_()">_connectAction_</a></strong>()</code>
<div class="block">Because there are so many connect() methods, the _connectAction_()
 method is provided as a means of performing some action immediately
 after establishing a connection, rather than reimplementing all
 of the connect() methods.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#addProtocolCommandListener(org.apache.commons.net.ProtocolCommandListener)">addProtocolCommandListener</a></strong>(<a href="../../../../org/apache/commons/net/ProtocolCommandListener.html" title="interface in org.apache.commons.net">ProtocolCommandListener</a>&nbsp;listener)</code>
<div class="block">Adds a ProtocolCommandListener.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#connect(java.net.InetAddress)">connect</a></strong>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a>&nbsp;host)</code>
<div class="block">Opens a Socket connected to a remote host at the current default port
 and originating from the current host at a system assigned port.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#connect(java.net.InetAddress, int)">connect</a></strong>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a>&nbsp;host,
              int&nbsp;port)</code>
<div class="block">Opens a Socket connected to a remote host at the specified port and
 originating from the current host at a system assigned port.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#connect(java.net.InetAddress, int, java.net.InetAddress, int)">connect</a></strong>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a>&nbsp;host,
              int&nbsp;port,
              <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a>&nbsp;localAddr,
              int&nbsp;localPort)</code>
<div class="block">Opens a Socket connected to a remote host at the specified port and
 originating from the specified local address and port.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#connect(java.lang.String)">connect</a></strong>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;hostname)</code>
<div class="block">Opens a Socket connected to a remote host at the current default
 port and originating from the current host at a system assigned port.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#connect(java.lang.String, int)">connect</a></strong>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;hostname,
              int&nbsp;port)</code>
<div class="block">Opens a Socket connected to a remote host at the specified port and
 originating from the current host at a system assigned port.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#connect(java.lang.String, int, java.net.InetAddress, int)">connect</a></strong>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;hostname,
              int&nbsp;port,
              <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a>&nbsp;localAddr,
              int&nbsp;localPort)</code>
<div class="block">Opens a Socket connected to a remote host at the specified port and
 originating from the specified local address and port.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#createCommandSupport()">createCommandSupport</a></strong>()</code>
<div class="block">Create the CommandSupport instance if required</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#disconnect()">disconnect</a></strong>()</code>
<div class="block">Disconnects the socket connection.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#fireCommandSent(java.lang.String, java.lang.String)">fireCommandSent</a></strong>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;command,
                              <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;message)</code>
<div class="block">If there are any listeners, send them the command details.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#fireReplyReceived(int, java.lang.String)">fireReplyReceived</a></strong>(int&nbsp;replyCode,
                                  <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;reply)</code>
<div class="block">If there are any listeners, send them the reply details.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#getCharset()">getCharset</a></strong>()</code>
<div class="block">Gets the charset.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#getCharsetName()">getCharsetName</a></strong>()</code>
<div class="block">Gets the charset name.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../org/apache/commons/net/ProtocolCommandSupport.html" title="class in org.apache.commons.net">ProtocolCommandSupport</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#getCommandSupport()">getCommandSupport</a></strong>()</code>
<div class="block">Subclasses can override this if they need to provide their own
 instance field for backwards compatibilty.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#getConnectTimeout()">getConnectTimeout</a></strong>()</code>
<div class="block">Get the underlying socket connection timeout.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#getDefaultPort()">getDefaultPort</a></strong>()</code>
<div class="block">Returns the current value of the default port (stored in
 <a href="../../../../org/apache/commons/net/SocketClient.html#_defaultPort_"><code>_defaultPort_ </code></a>).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#getDefaultTimeout()">getDefaultTimeout</a></strong>()</code>
<div class="block">Returns the default timeout in milliseconds that is used when
 opening a socket.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#getKeepAlive()">getKeepAlive</a></strong>()</code>
<div class="block">Returns the current value of the SO_KEEPALIVE flag on the currently opened socket.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#getLocalAddress()">getLocalAddress</a></strong>()</code>
<div class="block">Returns the local address  to which the client's socket is bound.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#getLocalPort()">getLocalPort</a></strong>()</code>
<div class="block">Returns the port number of the open socket on the local host used
 for the connection.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Proxy.html?is-external=true" title="class or interface in java.net">Proxy</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#getProxy()">getProxy</a></strong>()</code>
<div class="block">Gets the proxy for use with all the connections.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#getReceiveBufferSize()">getReceiveBufferSize</a></strong>()</code>
<div class="block">Get the current receivedBuffer size</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#getRemoteAddress()">getRemoteAddress</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#getRemotePort()">getRemotePort</a></strong>()</code>
<div class="block">Returns the port number of the remote host to which the client is
 connected.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#getSendBufferSize()">getSendBufferSize</a></strong>()</code>
<div class="block">Get the current sendBuffer size</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/net/ServerSocketFactory.html?is-external=true" title="class or interface in javax.net">ServerSocketFactory</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#getServerSocketFactory()">getServerSocketFactory</a></strong>()</code>
<div class="block">Get the underlying <a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/net/ServerSocketFactory.html?is-external=true" title="class or interface in javax.net"><code>ServerSocketFactory</code></a></div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#getSoLinger()">getSoLinger</a></strong>()</code>
<div class="block">Returns the current SO_LINGER timeout of the currently opened socket.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#getSoTimeout()">getSoTimeout</a></strong>()</code>
<div class="block">Returns the timeout in milliseconds of the currently opened socket.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#getTcpNoDelay()">getTcpNoDelay</a></strong>()</code>
<div class="block">Returns true if Nagle's algorithm is enabled on the currently opened
 socket.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#isAvailable()">isAvailable</a></strong>()</code>
<div class="block">Make various checks on the socket to test if it is available for use.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#isConnected()">isConnected</a></strong>()</code>
<div class="block">Returns true if the client is currently connected to a server.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#removeProtocolCommandListener(org.apache.commons.net.ProtocolCommandListener)">removeProtocolCommandListener</a></strong>(<a href="../../../../org/apache/commons/net/ProtocolCommandListener.html" title="interface in org.apache.commons.net">ProtocolCommandListener</a>&nbsp;listener)</code>
<div class="block">Removes a ProtocolCommandListener.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#setCharset(java.nio.charset.Charset)">setCharset</a></strong>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</code>
<div class="block">Sets the charset.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#setConnectTimeout(int)">setConnectTimeout</a></strong>(int&nbsp;connectTimeout)</code>
<div class="block">Sets the connection timeout in milliseconds, which will be passed to the <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html?is-external=true" title="class or interface in java.net"><code>Socket</code></a> object's
 connect() method.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#setDefaultPort(int)">setDefaultPort</a></strong>(int&nbsp;port)</code>
<div class="block">Sets the default port the SocketClient should connect to when a port
 is not specified.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#setDefaultTimeout(int)">setDefaultTimeout</a></strong>(int&nbsp;timeout)</code>
<div class="block">Set the default timeout in milliseconds to use when opening a socket.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#setKeepAlive(boolean)">setKeepAlive</a></strong>(boolean&nbsp;keepAlive)</code>
<div class="block">Sets the SO_KEEPALIVE flag on the currently opened socket.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#setProxy(java.net.Proxy)">setProxy</a></strong>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Proxy.html?is-external=true" title="class or interface in java.net">Proxy</a>&nbsp;proxy)</code>
<div class="block">Sets the proxy for use with all the connections.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#setReceiveBufferSize(int)">setReceiveBufferSize</a></strong>(int&nbsp;size)</code>
<div class="block">Sets the underlying socket receive buffer size.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#setSendBufferSize(int)">setSendBufferSize</a></strong>(int&nbsp;size)</code>
<div class="block">Set the underlying socket send buffer size.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#setServerSocketFactory(javax.net.ServerSocketFactory)">setServerSocketFactory</a></strong>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/net/ServerSocketFactory.html?is-external=true" title="class or interface in javax.net">ServerSocketFactory</a>&nbsp;factory)</code>
<div class="block">Sets the ServerSocketFactory used by the SocketClient to open ServerSocket
 connections.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#setSocketFactory(javax.net.SocketFactory)">setSocketFactory</a></strong>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/net/SocketFactory.html?is-external=true" title="class or interface in javax.net">SocketFactory</a>&nbsp;factory)</code>
<div class="block">Sets the SocketFactory used by the SocketClient to open socket
 connections.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#setSoLinger(boolean, int)">setSoLinger</a></strong>(boolean&nbsp;on,
                      int&nbsp;val)</code>
<div class="block">Sets the SO_LINGER timeout on the currently opened socket.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#setSoTimeout(int)">setSoTimeout</a></strong>(int&nbsp;timeout)</code>
<div class="block">Set the timeout in milliseconds of a currently open connection.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#setTcpNoDelay(boolean)">setTcpNoDelay</a></strong>(boolean&nbsp;on)</code>
<div class="block">Enables or disables the Nagle's algorithm (TCP_NODELAY) on the
 currently opened socket.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/net/SocketClient.html#verifyRemote(java.net.Socket)">verifyRemote</a></strong>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html?is-external=true" title="class or interface in java.net">Socket</a>&nbsp;socket)</code>
<div class="block">Verifies that the remote end of the given socket is connected to the
 the same host that the SocketClient is currently connected to.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="NETASCII_EOL">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NETASCII_EOL</h4>
<pre>public static final&nbsp;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.61">NETASCII_EOL</a></pre>
<div class="block">The end of line character sequence used by most IETF protocols.  That
 is a carriage return followed by a newline: "\r\n"</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.commons.net.SocketClient.NETASCII_EOL">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="_timeout_">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_timeout_</h4>
<pre>protected&nbsp;int <a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.78">_timeout_</a></pre>
<div class="block">The timeout to use after opening a socket.</div>
</li>
</ul>
<a name="_socket_">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_socket_</h4>
<pre>protected&nbsp;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html?is-external=true" title="class or interface in java.net">Socket</a> <a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.81">_socket_</a></pre>
<div class="block">The socket used for the connection.</div>
</li>
</ul>
<a name="_defaultPort_">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_defaultPort_</h4>
<pre>protected&nbsp;int <a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.84">_defaultPort_</a></pre>
<div class="block">The default port the client should connect to.</div>
</li>
</ul>
<a name="_input_">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_input_</h4>
<pre>protected&nbsp;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> <a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.87">_input_</a></pre>
<div class="block">The socket's InputStream.</div>
</li>
</ul>
<a name="_output_">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_output_</h4>
<pre>protected&nbsp;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> <a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.90">_output_</a></pre>
<div class="block">The socket's OutputStream.</div>
</li>
</ul>
<a name="_socketFactory_">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_socketFactory_</h4>
<pre>protected&nbsp;<a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/net/SocketFactory.html?is-external=true" title="class or interface in javax.net">SocketFactory</a> <a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.93">_socketFactory_</a></pre>
<div class="block">The socket's SocketFactory.</div>
</li>
</ul>
<a name="_serverSocketFactory_">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_serverSocketFactory_</h4>
<pre>protected&nbsp;<a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/net/ServerSocketFactory.html?is-external=true" title="class or interface in javax.net">ServerSocketFactory</a> <a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.96">_serverSocketFactory_</a></pre>
<div class="block">The socket's ServerSocket Factory.</div>
</li>
</ul>
<a name="connectTimeout">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>connectTimeout</h4>
<pre>protected&nbsp;int <a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.100">connectTimeout</a></pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="SocketClient()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>SocketClient</h4>
<pre>public&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.123">SocketClient</a>()</pre>
<div class="block">Default constructor for SocketClient.  Initializes
 _socket_ to null, _timeout_ to 0, _defaultPort to 0,
 _isConnected_ to false, charset to <code>Charset.defaultCharset()</code>
 and _socketFactory_ to a shared instance of
 <a href="../../../../org/apache/commons/net/DefaultSocketFactory.html" title="class in org.apache.commons.net"><code>DefaultSocketFactory</code></a>.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="_connectAction_()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_connectAction_</h4>
<pre>protected&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.151">_connectAction_</a>()
                        throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Because there are so many connect() methods, the _connectAction_()
 method is provided as a means of performing some action immediately
 after establishing a connection, rather than reimplementing all
 of the connect() methods.  The last action performed by every
 connect() method after opening a socket is to call this method.
 <p>
 This method sets the timeout on the just opened socket to the default
 timeout set by <a href="../../../../org/apache/commons/net/SocketClient.html#setDefaultTimeout(int)"><code>setDefaultTimeout() </code></a>,
 sets _input_ and _output_ to the socket's InputStream and OutputStream
 respectively, and sets _isConnected_ to true.
 <p>
 Subclasses overriding this method should start by calling
 <code> super._connectAction_() </code> first to ensure the
 initialization of the aforementioned protected variables.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd></dl>
</li>
</ul>
<a name="connect(java.net.InetAddress, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>connect</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.172">connect</a>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a>&nbsp;host,
           int&nbsp;port)
             throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a>,
                    <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Opens a Socket connected to a remote host at the specified port and
 originating from the current host at a system assigned port.
 Before returning, <a href="../../../../org/apache/commons/net/SocketClient.html#_connectAction_()"><code>_connectAction_() </code></a>
 is called to perform connection initialization actions.
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>host</code> - The remote host.</dd><dd><code>port</code> - The port to connect to on the remote host.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></code> - If the socket timeout could not be set.</dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If the socket could not be opened.  In most
  cases you will only want to catch IOException since SocketException is
  derived from it.</dd></dl>
</li>
</ul>
<a name="connect(java.lang.String, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>connect</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.200">connect</a>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;hostname,
           int&nbsp;port)
             throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a>,
                    <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Opens a Socket connected to a remote host at the specified port and
 originating from the current host at a system assigned port.
 Before returning, <a href="../../../../org/apache/commons/net/SocketClient.html#_connectAction_()"><code>_connectAction_() </code></a>
 is called to perform connection initialization actions.
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>hostname</code> - The name of the remote host.</dd><dd><code>port</code> - The port to connect to on the remote host.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></code> - If the socket timeout could not be set.</dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If the socket could not be opened.  In most
  cases you will only want to catch IOException since SocketException is
  derived from it.</dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/UnknownHostException.html?is-external=true" title="class or interface in java.net">UnknownHostException</a></code> - If the hostname cannot be resolved.</dd></dl>
</li>
</ul>
<a name="connect(java.net.InetAddress, int, java.net.InetAddress, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>connect</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.222">connect</a>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a>&nbsp;host,
           int&nbsp;port,
           <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a>&nbsp;localAddr,
           int&nbsp;localPort)
             throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a>,
                    <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Opens a Socket connected to a remote host at the specified port and
 originating from the specified local address and port.
 Before returning, <a href="../../../../org/apache/commons/net/SocketClient.html#_connectAction_()"><code>_connectAction_() </code></a>
 is called to perform connection initialization actions.
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>host</code> - The remote host.</dd><dd><code>port</code> - The port to connect to on the remote host.</dd><dd><code>localAddr</code> - The local address to use.</dd><dd><code>localPort</code> - The local port to use.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></code> - If the socket timeout could not be set.</dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If the socket could not be opened.  In most
  cases you will only want to catch IOException since SocketException is
  derived from it.</dd></dl>
</li>
</ul>
<a name="connect(java.lang.String, int, java.net.InetAddress, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>connect</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.255">connect</a>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;hostname,
           int&nbsp;port,
           <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a>&nbsp;localAddr,
           int&nbsp;localPort)
             throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a>,
                    <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Opens a Socket connected to a remote host at the specified port and
 originating from the specified local address and port.
 Before returning, <a href="../../../../org/apache/commons/net/SocketClient.html#_connectAction_()"><code>_connectAction_() </code></a>
 is called to perform connection initialization actions.
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>hostname</code> - The name of the remote host.</dd><dd><code>port</code> - The port to connect to on the remote host.</dd><dd><code>localAddr</code> - The local address to use.</dd><dd><code>localPort</code> - The local port to use.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></code> - If the socket timeout could not be set.</dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If the socket could not be opened.  In most
  cases you will only want to catch IOException since SocketException is
  derived from it.</dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/UnknownHostException.html?is-external=true" title="class or interface in java.net">UnknownHostException</a></code> - If the hostname cannot be resolved.</dd></dl>
</li>
</ul>
<a name="connect(java.net.InetAddress)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>connect</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.275">connect</a>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a>&nbsp;host)
             throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a>,
                    <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Opens a Socket connected to a remote host at the current default port
 and originating from the current host at a system assigned port.
 Before returning, <a href="../../../../org/apache/commons/net/SocketClient.html#_connectAction_()"><code>_connectAction_() </code></a>
 is called to perform connection initialization actions.
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>host</code> - The remote host.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></code> - If the socket timeout could not be set.</dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If the socket could not be opened.  In most
  cases you will only want to catch IOException since SocketException is
  derived from it.</dd></dl>
</li>
</ul>
<a name="connect(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>connect</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.294">connect</a>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;hostname)
             throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a>,
                    <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Opens a Socket connected to a remote host at the current default
 port and originating from the current host at a system assigned port.
 Before returning, <a href="../../../../org/apache/commons/net/SocketClient.html#_connectAction_()"><code>_connectAction_() </code></a>
 is called to perform connection initialization actions.
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>hostname</code> - The name of the remote host.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></code> - If the socket timeout could not be set.</dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If the socket could not be opened.  In most
  cases you will only want to catch IOException since SocketException is
  derived from it.</dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/UnknownHostException.html?is-external=true" title="class or interface in java.net">UnknownHostException</a></code> - If the hostname cannot be resolved.</dd></dl>
</li>
</ul>
<a name="disconnect()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>disconnect</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.310">disconnect</a>()
                throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Disconnects the socket connection.
 You should call this method after you've finished using the class
 instance and also before you call
 <a href="../../../../org/apache/commons/net/SocketClient.html#connect(java.net.InetAddress, int)"><code>connect() </code></a>
 again.  _isConnected_ is set to false, _socket_ is set to null,
 _input_ is set to null, and _output_ is set to null.
 <p></div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If there is an error closing the socket.</dd></dl>
</li>
</ul>
<a name="isConnected()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isConnected</h4>
<pre>public&nbsp;boolean&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.344">isConnected</a>()</pre>
<div class="block">Returns true if the client is currently connected to a server.
 <p>
 Delegates to <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html?is-external=true#isConnected()" title="class or interface in java.net"><code>Socket.isConnected()</code></a></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>True if the client is currently connected to a server,
         false otherwise.</dd></dl>
</li>
</ul>
<a name="isAvailable()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAvailable</h4>
<pre>public&nbsp;boolean&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.361">isAvailable</a>()</pre>
<div class="block">Make various checks on the socket to test if it is available for use.
 Note that the only sure test is to use it, but these checks may help
 in some cases.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd><code>true</code> if the socket appears to be available for use</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.0</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="https://issues.apache.org/jira/browse/NET-350">NET-350</a></dd></dl>
</li>
</ul>
<a name="setDefaultPort(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDefaultPort</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.408">setDefaultPort</a>(int&nbsp;port)</pre>
<div class="block">Sets the default port the SocketClient should connect to when a port
 is not specified.  The <a href="../../../../org/apache/commons/net/SocketClient.html#_defaultPort_"><code>_defaultPort_ </code></a>
 variable stores this value.  If never set, the default port is equal
 to zero.
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>port</code> - The default port to set.</dd></dl>
</li>
</ul>
<a name="getDefaultPort()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDefaultPort</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.419">getDefaultPort</a>()</pre>
<div class="block">Returns the current value of the default port (stored in
 <a href="../../../../org/apache/commons/net/SocketClient.html#_defaultPort_"><code>_defaultPort_ </code></a>).
 <p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The current value of the default port.</dd></dl>
</li>
</ul>
<a name="setDefaultTimeout(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDefaultTimeout</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.436">setDefaultTimeout</a>(int&nbsp;timeout)</pre>
<div class="block">Set the default timeout in milliseconds to use when opening a socket.
 This value is only used previous to a call to
 <a href="../../../../org/apache/commons/net/SocketClient.html#connect(java.net.InetAddress, int)"><code>connect()</code></a>
 and should not be confused with <a href="../../../../org/apache/commons/net/SocketClient.html#setSoTimeout(int)"><code>setSoTimeout()</code></a>
 which operates on an the currently opened socket.  _timeout_ contains
 the new timeout value.
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>timeout</code> - The timeout in milliseconds to use for the socket
                 connection.</dd></dl>
</li>
</ul>
<a name="getDefaultTimeout()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDefaultTimeout</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.449">getDefaultTimeout</a>()</pre>
<div class="block">Returns the default timeout in milliseconds that is used when
 opening a socket.
 <p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The default timeout in milliseconds that is used when
         opening a socket.</dd></dl>
</li>
</ul>
<a name="setSoTimeout(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSoTimeout</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.467">setSoTimeout</a>(int&nbsp;timeout)
                  throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></pre>
<div class="block">Set the timeout in milliseconds of a currently open connection.
 Only call this method after a connection has been opened
 by <a href="../../../../org/apache/commons/net/SocketClient.html#connect(java.net.InetAddress, int)"><code>connect()</code></a>.
 <p>
 To set the initial timeout, use <a href="../../../../org/apache/commons/net/SocketClient.html#setDefaultTimeout(int)"><code>setDefaultTimeout(int)</code></a> instead.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>timeout</code> - The timeout in milliseconds to use for the currently
                 open socket connection.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></code> - If the operation fails.</dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the socket is not currently open</dd></dl>
</li>
</ul>
<a name="setSendBufferSize(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSendBufferSize</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.480">setSendBufferSize</a>(int&nbsp;size)
                       throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></pre>
<div class="block">Set the underlying socket send buffer size.
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>size</code> - The size of the buffer in bytes.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></code></dd><dt><span class="strong">Since:</span></dt>
  <dd>2.0</dd></dl>
</li>
</ul>
<a name="getSendBufferSize()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSendBufferSize</h4>
<pre>protected&nbsp;int&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.489">getSendBufferSize</a>()</pre>
<div class="block">Get the current sendBuffer size</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the size, or -1 if not initialised</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.0</dd></dl>
</li>
</ul>
<a name="setReceiveBufferSize(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setReceiveBufferSize</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.500">setReceiveBufferSize</a>(int&nbsp;size)
                          throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></pre>
<div class="block">Sets the underlying socket receive buffer size.
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>size</code> - The size of the buffer in bytes.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></code></dd><dt><span class="strong">Since:</span></dt>
  <dd>2.0</dd></dl>
</li>
</ul>
<a name="getReceiveBufferSize()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReceiveBufferSize</h4>
<pre>protected&nbsp;int&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.509">getReceiveBufferSize</a>()</pre>
<div class="block">Get the current receivedBuffer size</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the size, or -1 if not initialised</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.0</dd></dl>
</li>
</ul>
<a name="getSoTimeout()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSoTimeout</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.520">getSoTimeout</a>()
                 throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></pre>
<div class="block">Returns the timeout in milliseconds of the currently opened socket.
 <p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The timeout in milliseconds of the currently opened socket.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></code> - If the operation fails.</dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the socket is not currently open</dd></dl>
</li>
</ul>
<a name="setTcpNoDelay(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTcpNoDelay</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.533">setTcpNoDelay</a>(boolean&nbsp;on)
                   throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></pre>
<div class="block">Enables or disables the Nagle's algorithm (TCP_NODELAY) on the
 currently opened socket.
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>on</code> - True if Nagle's algorithm is to be enabled, false if not.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></code> - If the operation fails.</dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the socket is not currently open</dd></dl>
</li>
</ul>
<a name="getTcpNoDelay()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTcpNoDelay</h4>
<pre>public&nbsp;boolean&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.548">getTcpNoDelay</a>()
                      throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></pre>
<div class="block">Returns true if Nagle's algorithm is enabled on the currently opened
 socket.
 <p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>True if Nagle's algorithm is enabled on the currently opened
        socket, false otherwise.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></code> - If the operation fails.</dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the socket is not currently open</dd></dl>
</li>
</ul>
<a name="setKeepAlive(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setKeepAlive</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.565">setKeepAlive</a>(boolean&nbsp;keepAlive)
                  throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></pre>
<div class="block">Sets the SO_KEEPALIVE flag on the currently opened socket.

 From the Javadocs, the default keepalive time is 2 hours (although this is
 implementation  dependent). It looks as though the Windows WSA sockets implementation
 allows a specific keepalive value to be set, although this seems not to be the case on
 other systems.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>keepAlive</code> - If true, keepAlive is turned on</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></code></dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the socket is not currently open</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.2</dd></dl>
</li>
</ul>
<a name="getKeepAlive()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getKeepAlive</h4>
<pre>public&nbsp;boolean&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.577">getKeepAlive</a>()
                     throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></pre>
<div class="block">Returns the current value of the SO_KEEPALIVE flag on the currently opened socket.
 Delegates to <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html?is-external=true#getKeepAlive()" title="class or interface in java.net"><code>Socket.getKeepAlive()</code></a></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>True if SO_KEEPALIVE is enabled.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></code></dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the socket is not currently open</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.2</dd></dl>
</li>
</ul>
<a name="setSoLinger(boolean, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSoLinger</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.589">setSoLinger</a>(boolean&nbsp;on,
               int&nbsp;val)
                 throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></pre>
<div class="block">Sets the SO_LINGER timeout on the currently opened socket.
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>on</code> - True if linger is to be enabled, false if not.</dd><dd><code>val</code> - The linger timeout (in hundredths of a second?)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></code> - If the operation fails.</dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the socket is not currently open</dd></dl>
</li>
</ul>
<a name="getSoLinger()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSoLinger</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.603">getSoLinger</a>()
                throws <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></pre>
<div class="block">Returns the current SO_LINGER timeout of the currently opened socket.
 <p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The current SO_LINGER timeout.  If SO_LINGER is disabled returns
         -1.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/SocketException.html?is-external=true" title="class or interface in java.net">SocketException</a></code> - If the operation fails.</dd>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the socket is not currently open</dd></dl>
</li>
</ul>
<a name="getLocalPort()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocalPort</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.618">getLocalPort</a>()</pre>
<div class="block">Returns the port number of the open socket on the local host used
 for the connection.
 Delegates to <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html?is-external=true#getLocalPort()" title="class or interface in java.net"><code>Socket.getLocalPort()</code></a>
 <p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The port number of the open socket on the local host used
         for the connection.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the socket is not currently open</dd></dl>
</li>
</ul>
<a name="getLocalAddress()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocalAddress</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a>&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.631">getLocalAddress</a>()</pre>
<div class="block">Returns the local address  to which the client's socket is bound.
 Delegates to <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html?is-external=true#getLocalAddress()" title="class or interface in java.net"><code>Socket.getLocalAddress()</code></a>
 <p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The local address to which the client's socket is bound.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the socket is not currently open</dd></dl>
</li>
</ul>
<a name="getRemotePort()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRemotePort</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.645">getRemotePort</a>()</pre>
<div class="block">Returns the port number of the remote host to which the client is
 connected.
 Delegates to <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html?is-external=true#getPort()" title="class or interface in java.net"><code>Socket.getPort()</code></a>
 <p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The port number of the remote host to which the client is
         connected.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the socket is not currently open</dd></dl>
</li>
</ul>
<a name="getRemoteAddress()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRemoteAddress</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a>&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.656">getRemoteAddress</a>()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>The remote address to which the client is connected.
 Delegates to <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html?is-external=true#getInetAddress()" title="class or interface in java.net"><code>Socket.getInetAddress()</code></a></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the socket is not currently open</dd></dl>
</li>
</ul>
<a name="verifyRemote(java.net.Socket)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>verifyRemote</h4>
<pre>public&nbsp;boolean&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.671">verifyRemote</a>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html?is-external=true" title="class or interface in java.net">Socket</a>&nbsp;socket)</pre>
<div class="block">Verifies that the remote end of the given socket is connected to the
 the same host that the SocketClient is currently connected to.  This
 is useful for doing a quick security check when a client needs to
 accept a connection from a server, such as an FTP data connection or
 a BSD R command standard error stream.
 <p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>True if the remote hosts are the same, false if not.</dd></dl>
</li>
</ul>
<a name="setSocketFactory(javax.net.SocketFactory)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSocketFactory</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.691">setSocketFactory</a>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/net/SocketFactory.html?is-external=true" title="class or interface in javax.net">SocketFactory</a>&nbsp;factory)</pre>
<div class="block">Sets the SocketFactory used by the SocketClient to open socket
 connections.  If the factory value is null, then a default
 factory is used (only do this to reset the factory after having
 previously altered it).
 Any proxy setting is discarded.
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>factory</code> - The new SocketFactory the SocketClient should use.</dd></dl>
</li>
</ul>
<a name="setServerSocketFactory(javax.net.ServerSocketFactory)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setServerSocketFactory</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.713">setServerSocketFactory</a>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/net/ServerSocketFactory.html?is-external=true" title="class or interface in javax.net">ServerSocketFactory</a>&nbsp;factory)</pre>
<div class="block">Sets the ServerSocketFactory used by the SocketClient to open ServerSocket
 connections.  If the factory value is null, then a default
 factory is used (only do this to reset the factory after having
 previously altered it).
 <p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>factory</code> - The new ServerSocketFactory the SocketClient should use.</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.0</dd></dl>
</li>
</ul>
<a name="setConnectTimeout(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setConnectTimeout</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.727">setConnectTimeout</a>(int&nbsp;connectTimeout)</pre>
<div class="block">Sets the connection timeout in milliseconds, which will be passed to the <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html?is-external=true" title="class or interface in java.net"><code>Socket</code></a> object's
 connect() method.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>connectTimeout</code> - The connection timeout to use (in ms)</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.0</dd></dl>
</li>
</ul>
<a name="getConnectTimeout()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConnectTimeout</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.736">getConnectTimeout</a>()</pre>
<div class="block">Get the underlying socket connection timeout.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>timeout (in ms)</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.0</dd></dl>
</li>
</ul>
<a name="getServerSocketFactory()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getServerSocketFactory</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/net/ServerSocketFactory.html?is-external=true" title="class or interface in javax.net">ServerSocketFactory</a>&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.745">getServerSocketFactory</a>()</pre>
<div class="block">Get the underlying <a href="http://download.oracle.com/javase/1.5.0/docs/api/javax/net/ServerSocketFactory.html?is-external=true" title="class or interface in javax.net"><code>ServerSocketFactory</code></a></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The server socket factory</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.2</dd></dl>
</li>
</ul>
<a name="addProtocolCommandListener(org.apache.commons.net.ProtocolCommandListener)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addProtocolCommandListener</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.756">addProtocolCommandListener</a>(<a href="../../../../org/apache/commons/net/ProtocolCommandListener.html" title="interface in org.apache.commons.net">ProtocolCommandListener</a>&nbsp;listener)</pre>
<div class="block">Adds a ProtocolCommandListener.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>listener</code> - The ProtocolCommandListener to add.</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.0</dd></dl>
</li>
</ul>
<a name="removeProtocolCommandListener(org.apache.commons.net.ProtocolCommandListener)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeProtocolCommandListener</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.766">removeProtocolCommandListener</a>(<a href="../../../../org/apache/commons/net/ProtocolCommandListener.html" title="interface in org.apache.commons.net">ProtocolCommandListener</a>&nbsp;listener)</pre>
<div class="block">Removes a ProtocolCommandListener.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>listener</code> - The ProtocolCommandListener to remove.</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.0</dd></dl>
</li>
</ul>
<a name="fireReplyReceived(int, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fireReplyReceived</h4>
<pre>protected&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.777">fireReplyReceived</a>(int&nbsp;replyCode,
                     <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;reply)</pre>
<div class="block">If there are any listeners, send them the reply details.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>replyCode</code> - the code extracted from the reply</dd><dd><code>reply</code> - the full reply text</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.0</dd></dl>
</li>
</ul>
<a name="fireCommandSent(java.lang.String, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fireCommandSent</h4>
<pre>protected&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.790">fireCommandSent</a>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;command,
                   <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;message)</pre>
<div class="block">If there are any listeners, send them the command details.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>command</code> - the command name</dd><dd><code>message</code> - the complete message, including command name</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.0</dd></dl>
</li>
</ul>
<a name="createCommandSupport()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createCommandSupport</h4>
<pre>protected&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.799">createCommandSupport</a>()</pre>
<div class="block">Create the CommandSupport instance if required</div>
</li>
</ul>
<a name="getCommandSupport()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCommandSupport</h4>
<pre>protected&nbsp;<a href="../../../../org/apache/commons/net/ProtocolCommandSupport.html" title="class in org.apache.commons.net">ProtocolCommandSupport</a>&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.810">getCommandSupport</a>()</pre>
<div class="block">Subclasses can override this if they need to provide their own
 instance field for backwards compatibilty.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the CommandSupport instance, may be <code>null</code></dd><dt><span class="strong">Since:</span></dt>
  <dd>3.0</dd></dl>
</li>
</ul>
<a name="setProxy(java.net.Proxy)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setProxy</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.822">setProxy</a>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Proxy.html?is-external=true" title="class or interface in java.net">Proxy</a>&nbsp;proxy)</pre>
<div class="block">Sets the proxy for use with all the connections.
 The proxy is used for connections established after the
 call to this method.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>proxy</code> - the new proxy for connections.</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.2</dd></dl>
</li>
</ul>
<a name="getProxy()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProxy</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/Proxy.html?is-external=true" title="class or interface in java.net">Proxy</a>&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.831">getProxy</a>()</pre>
<div class="block">Gets the proxy for use with all the connections.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the current proxy for connections.</dd></dl>
</li>
</ul>
<a name="getCharsetName()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCharsetName</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.842">getCharsetName</a>()</pre>
<div class="block">Gets the charset name.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the charset.</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.3
 TODO Will be deprecated once the code requires Java 1.6 as a mininmum</dd></dl>
</li>
</ul>
<a name="getCharset()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCharset</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.852">getCharset</a>()</pre>
<div class="block">Gets the charset.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the charset.</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.3</dd></dl>
</li>
</ul>
<a name="setCharset(java.nio.charset.Charset)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setCharset</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../src-html/org/apache/commons/net/SocketClient.html#line.862">setCharset</a>(<a href="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/charset/Charset.html?is-external=true" title="class or interface in java.nio.charset">Charset</a>&nbsp;charset)</pre>
<div class="block">Sets the charset.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>charset</code> - the charset.</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.3</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/SocketClient.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/commons/net/ProtocolCommandSupport.html" title="class in org.apache.commons.net"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/commons/net/SocketClient.html" target="_top">Frames</a></li>
<li><a href="SocketClient.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2001-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</small></p>
</body>
</html>
